<?php
/* multiply random image
 * developer: jobad <joebenick@gmail.com><http://j0bad.multiply.com/>
 * description: this script is a sort of plugin to have a random header, backgroud or any images
 *              you want to randomize by adding this script to your css.
 * modified date: october 20, 2008
 * 
 * to do:
 *  1. to automatic image url entry to array (the code must determine if there's a new uploaded image)
 * 
 * copyright:
 *   i only ask not to remove this part of the comment this will serve as my copyright,
 *   but anyone can modify the whole code, just let me know by sending an email ^___^ thanks!
 * 
 * references:
 *   http://www.pearsonified.com/2006/10/simple_random_header_images_for_your_blog.php
 *   http://kilianvalkhof.com/2006/css-xhtml/random-css-thought-math-in-css/
 *   http://sonspring.com/journal/easy-random-css-backgrounds
 * 
 * discussion on my multiply page:
 *   http://j0bad.multiply.com/journal/item/25/Multiply_Randomizer
 * 
 * project home:
 * http://code.google.com/p/mhr/
 * -- you can download the code and download via subverion
 */
 
$array_img = array('http://www.domain.com/image-folde/header1.jpg',
                   'http://www.domain.com/image-folde/header2.jpg');

$num_array = count($array_img);
$rand_img = array_rand($array_img, $num_array);

for ($i=0;$i>=$num_array;$i++);
{
  header('Location: '.$array_img[$rand_img[$i]]);
}
?>
